//
//  RestaurantReviewResponse.swift
//  FeastBooking
//
//  Created by Imon on 2017/11/19.
//  Copyright © 2017年 Imon. All rights reserved.
//

import Foundation
import ObjectMapper

class RestaurantReviewResponse: Response {
    
    var content: [RestaurantReview]?
    var first: Bool?
    var last: Bool?
    var number: Int?
    var numberOfElements: Int?
    var size: Int?
    var totalElements: Int?
    var totalPages: Int?
    
    required init?(map: Map) {
        super.init(map: map)
    }
    
    override func mapping(map: Map) {
        super.mapping(map: map)
        content <- map["content"]
        first <- map["first"]
        last <- map["last"]
        number <- map["number"]
        numberOfElements <- map["numberOfElements"]
        size <- map["size"]
        totalElements <- map["totalElements"]
        totalPages <- map["totalPages"]
    }
}

class RestaurantReview: NSObject, Mappable {
    
    var author: String?
    var authorId: Int?
    var banquetHall: String?
    var hotelId: Int?
    var id: Int?
    var rating: Double?
    var review: String?
    var reviewTime: String?
    
    required init?(map: Map) {
        
    }
    
    override init() {
        
    }
    
    func mapping(map: Map) {
        author <- map["author"]
        authorId <- map["authorId"]
        banquetHall <- map["banquetHall"]
        hotelId <- map["hotelId"]
        id <- map["id"]
        rating <- map["rating"]
        review <- map["review"]
        reviewTime <- map["reviewTime"]
    }
}
